package model;

import java.io.Serializable;
import javax.persistence.*;



/**
 * The persistent class for the announce database table.
 * 
 */
@Entity
@NamedQuery(name="Announce.findAll", query="SELECT a FROM Announce a")
public class Announce implements Serializable {
	private static final long serialVersionUID = 1L;

	@Id
	private int idAnnounce;

	//bi-directional one-to-one association to Election
	@OneToOne
	@PrimaryKeyJoinColumn
	//@JoinColumns({
	//	@JoinColumn(name="DateElection", referencedColumnName="dateElection"),
	//	@JoinColumn(name="EndCandidacy", referencedColumnName="endCandidacy"),
	//	@JoinColumn(name="StartCandidacy", referencedColumnName="startCandidacy"),
		
	//	})
	private Election election;

	//bi-directional one-to-one association to Governor
	@OneToOne
	@JoinColumn(name="idGovernor")
	private Governor governor;

	public Announce() {
	}

	public int getIdAnnounce() {
		return this.idAnnounce;
	}

	public void setIdAnnounce(int idAnnounce) {
		this.idAnnounce = idAnnounce;
	}

	public Election getElection() {
		return this.election;
	}

	public void setElection(Election election) {
		this.election = election;
	}

	public Governor getGovernor() {
		return this.governor;
	}

	public void setGovernor(Governor governor) {
		this.governor = governor;
	}

}